package vip.xiaonuo.smzq.modular.lifecycle.service.entity.impl;

import  java.util.List;
import java.util.Map;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.smzq.modular.lifecycle.entity.LifeCyclePedigee;
import vip.xiaonuo.smzq.modular.lifecycle.mapper.entity.LifeCyclePedigeeMapper;
import vip.xiaonuo.smzq.modular.lifecycle.service.entity.LifeCyclePedigeeService;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * <p>
 * 全生命周期族谱 服务实现类
 * </p>
 *
 * @author 于彦飞
 * @since 2024-04-09
 */
@Service
public class LifeCyclePedigeeServiceImpl extends ServiceImpl<LifeCyclePedigeeMapper, LifeCyclePedigee> implements LifeCyclePedigeeService {
        @Autowired
        private LifeCyclePedigeeMapper lifeCyclePedigeeMapper;




        @Override
        public List<LifeCyclePedigee>  queryLifeCyclePedigeeList(LifeCyclePedigee lifeCyclePedigee){
            List<LifeCyclePedigee> list = new LambdaQueryChainWrapper<LifeCyclePedigee>(lifeCyclePedigeeMapper).setEntity(lifeCyclePedigee)
            .list();
//            DictConvertUtil.convertToDictionaryList(list,null);
            return list;
        }

        @Override
        public IPage<LifeCyclePedigee> queryLifeCyclePedigeeListPage(LifeCyclePedigee lifeCyclePedigee){
            IPage<LifeCyclePedigee> iPage = new LambdaQueryChainWrapper<LifeCyclePedigee>(lifeCyclePedigeeMapper).setEntity(lifeCyclePedigee)
            .page(new Page<>(lifeCyclePedigee.getCurrentPageNum(),lifeCyclePedigee.getPageSize()));

            List<LifeCyclePedigee> records = iPage.getRecords();
//            DictConvertUtil.convertToDictionaryList(records,null);
            iPage.setRecords(records);
            return iPage;
        }








}

